home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
winsock
/
wlprs40c.zip
/
WSOCKAID.ASC
< prev
next >
Wrap
Text File
|
1994-12-21
|
6KB
|
145 lines
WSOCKAID.DLL Version 2.0b
December 21, 1994
This DLL contains functions that are currently missing in the
Windows Sockets 1.1 specification, but which are needed for
some networking applications. Currently this DLL supports only
FTP Software's PC/TCP Version 2.1 and above. For this TCP/IP
stack, all information that WSOCKAID.DLL can give is retrieved
from the PCTCP.INI file (or whatever your PCTCP env. variable
points to). If you want to use this DLL together with other
stacks and get errors like "Could not resolve username" from
network applications, look at the list of functions below. For
each inquiry function the information returned to a program can
also be defined in the WIN.INI file by creating a section named
[WSOCKAID] and adding the appropriate entry.
For setting the username a Control Panel Applet named
WSAIDCNF.CPL is included. If you move this program to your
WINDOWS/SYSTEM directory, you can set the username by double-
clicking on the "question mark face" icon. See also the remarks
on the WSAIDGetUsername function below.
The following functions are exported by this DLL:
WSAIDGetUsername This function retrieves the user name that
a PC user has registered with the
networking software. If the used networking
software has a real Windows network driver
(like PC/TCP 2.2 and later has) and this
driver supports the WNetGetUser function,
the return value of this function is given
to the calling program instead of the
username defined in the [WSOCKAID] section
of WIN.INI. You can override this behaviour
to always use the username in the
[WSOCKAID] section by putting an entry like
AlwaysUseWSAIDUsername=1
into this section, or checking the
corresponding box in the Control Panel
applet.
To find out if your networking software has
such a driver, look if the [boot] section
in SYSTEM.INI contains a network.drv= entry
that is not empty.
If such a driver cannot be located, the DLL
looks at various places to obtain a
username. These places are (in search order
):
the öUser=ö entry of section [pctcp general] if the PCTCP
env. variable is set to an existing configuration file for FTP
SoftwareÆs PC/TCP
the öUsername=ö entry of section [Network] in SYSTEM.INI
the öUsername=ö entry of section [TcpGlobal] in
TCPUTILS.INI
the öUser=ö entry of section [WSockAid] in WIN.INI
[WSOCKAID]-Entry: User=<username>
WSAIDGetRealname This function returns the real name that a
PC user has registered with the networking
software.
[WSOCKAID]-Entry: Full-Name=<user's real
name>
WSAIDGetHostname This function returns the locally defined
host name for the PC (without any domain
information appended).
The following places are searched for a
hostname definition in the given order:
the öHost-Name=ö entry of section [pctcp general] if the
PCTCP env. variable is set to an existing configuration file
for FTP SoftwareÆs PC/TCP
the öComputerName=ö entry of section [Network] in
SYSTEM.INI
the öHost-Name=ö entry of section [WSockAid] in WIN.INI
[WSOCKAID]-Entry: Host-Name=<PC's
hostname>
WSAIDGetDomain This function returns the Internet domain
that the PC belongs to.
[WSOCKAID]-Entry: Domain=<PC's domain>
WSAIDGetDefaultPrinter This function returns the
default LPR network printer as separate
queue and server name.
[WSOCKAID]-Entry: LPRQueue=<queue name>
LPRServer=<server name>
Change Log:
Version 2.0a:
WSOCKAID now searches in various other places for a
username. The search order is:
1. See if a network driver is installed (see SYSTEM.INI
section [boot], entry network.drv=). If present, call
its function WNetGetUser().
2. Look if the env. variable PCTCP is defined. If so, try
to read the username from the relevant INI file.
3. Look if the SYSTEM.INI section [Network] contains an
entry Username=.
4. Look if a file TCPUTILS.INI exists which has an entry
Username= in the section [TCPGlobal]
5. Return an error value.
Version 2.0b:
Removed a small bug that caused the username set in the
[WSockAid] section of WIN.INI not to be used although is
should have been.
Now the WSAIDGetHostname() function returns the
öComputerName=ö setting in the [Network] section of
SYSTEM.INI if this is defined (under Windows for
Workgroups).
Copyright:
This DLL is Copyright (C) 1993-94 by Thomas Heil.
Redistribution of this DLL is allowed only together with the
documentation (as PostScript file and as plain ASCII .ASC
file). This software may not be sold by itself. Applications
that use this DLL may be sold together with the DLL and its
documentation included royalty free.
If you are a network software vendor and think that your TCP/IP
stack should be supported, please contact me.
Author:
Thomas Heil
Hindenburgstr. 50
41352 Korschenbroich
E-Mail: th.heil@kfa-juelich.de (Internet)